package com.equipment.management.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.equipment.management.entity.SensorData;
import com.equipment.management.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Repository
public interface UserDao extends BaseMapper<User> {
    List<Map> selectUsers(@Param("name") String name);
    public User getUserByMessage(@Param("account") String account, @Param("password") String password);
    public List<SensorData> getAllUser(@Param("username") String username, @Param("pageStart") int pageStart, @Param("pageSize") int pageSize);
    public int getUserCounts(@Param("username") String username);
    public int updateState(Integer id, Boolean state);
    public int addUser(User user);
    public int deleteUser(Integer id);
    public User getUpdateUser(int id);
    public int editUser(User user);


    //int insert(User record);


    User getUserByAccount(String account);


}
